package com.zy.datareceiver.binsess.warning.dao.impl;

import com.zy.datareceiver.binsess.monitoring.param.index.WarningTypesDistributionData;
import com.zy.datareceiver.binsess.warning.dao.WarningLevelDao;
import com.zy.datareceiver.binsess.warning.mapper.WarningLevelMapper;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WarningLevelDaoImpl implements WarningLevelDao {
    @Resource
    private WarningLevelMapper warningLevelMapper;

    @Cacheable(cacheNames = "countWarning")
    @Override
    public List<WarningTypesDistributionData> countWarning(String startTime, String endTime) {
        return warningLevelMapper.countWarning(startTime,endTime);
    }
}
